﻿@using Amba.ImageMultiPicker.Fields
@using Amba.ImageMultiPicker.HtmlHelpers
@using System.Linq
@{
    var field = (ImageMultiPickerField)Model.Field;
}
<style type="text/css">
    .image-item-list-box {
        display:block;
        clear:both;
        width:100%;
        height:68px;
        float:left;
    }
    .image-item {
        float:left;
        margin-bottom: 4px;
        margin-top: 4px;
        margin-right:4px;
    }
    .field-info {
        padding-top: 25px;
    }
</style>
@if (field.Images.Any())
{
    <div class="image-item-list-box">
        @foreach (var image in field.Images.Take(4))
        {   
            <div class="image-item">
                <a href="@image.FilePath" target="_blank">
                    @Html.ResizedImage(image.FilePath, height:60, htmlAttributes: new { alt="", @class="pickerimage"}) 
                </a>
            </div>
        }
        <div class="field-info">
            @T("Images Count"): @(field.Images.Count())
        </div>
    </div>
}